<?php
namespace app\frontend\controller;
use think\Db;
use think\Controller;
class Activity extends Controller
{
    public function index()
    {
    	if(!session('user_id'))
    	{
    		$user_name='登录';
            $login='/frontend/login/index';
    		$user_register='注册';
    		$user_logout='';
    	}
    	else
    	{
            if(!session('user_name'))
          {
            $user_name=session('user_phone');
          }
          else
          {
            $user_name=session('user_name');
          }
            $login='/frontend/person/index';
        	$user_register='欢迎你';
        	$user_logout='退出';
        }

        $this->assign('login',$login);
    	$this->assign('user_name',$user_name);
    	$this->assign('user_register',$user_register);
        $this->assign('user_logout',$user_logout);
    	return view('index/activity');
    }
}